﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Telerik.WinControls.UI;
using Telerik.WinControls;

using System.Windows.Forms;
using System.Drawing;


namespace LIM
{
    public class RadDesktopAlert_SavingStatus
	{
        static RadDesktopAlert radDesktopAlert;
        public static void Init(Main main)
        {
            radDesktopAlert = main.radDesktopAlert_SavingStatus;
            radDesktopAlert.AutoClose = true;
            radDesktopAlert.AutoCloseDelay = 2;
            radDesktopAlert.FixedSize = new Size(300, 100);
            radDesktopAlert.PopupAnimationFrames = 5;
            radDesktopAlert.FadeAnimationFrames = 5;
            radDesktopAlert.Opacity = 1;
            radDesktopAlert.ScreenPosition = AlertScreenPosition.BottomLeft;
            radDesktopAlert.CanMove = false;

            radDesktopAlert.ShowOptionsButton = false;
            radDesktopAlert.ShowPinButton = false;
        }

        public static void ShowAlertSaveSuccess(string captionText, string contentText)
        {            
            contentText = "<html><span><color=Gray><size=10>" + captionText + "</span><br><span><color=Blue><size=11>" + contentText + "</span></html>";
            Application.UseWaitCursor = false;
            //radDesktopAlert.CaptionText = captionText;
            radDesktopAlert.ContentText = contentText;
            radDesktopAlert.ContentImage = GetImageFromResource.Success();            
            radDesktopAlert.Show();
        }
        public static void ShowAlertDeleteSuccess(string captionText, string contentText)
        {
            contentText = "<html><span><color=Gray><size=10>" + captionText + "</span><br><span><color=Red><size=11>" + contentText + "</span></html>";
            Application.UseWaitCursor = false;
            //radDesktopAlert.CaptionText = captionText;
            radDesktopAlert.ContentText = contentText;
            radDesktopAlert.ContentImage = GetImageFromResource.Success();
            radDesktopAlert.Show();
        }
        public static void ShowAlertNotPermission(string captionText, string contentText)
        {
            contentText = "<html><span><color=Blue><size=10>" + captionText + "</span><br><span><color=Red><size=11>" + contentText + "</span></html>";
            Application.UseWaitCursor = false;
            //radDesktopAlert.CaptionText = captionText;
            radDesktopAlert.ContentText = contentText;
            radDesktopAlert.ContentImage = GetImageFromResource.Armor();
            radDesktopAlert.Show();
        }

	}
}
